package com.tianzeculture.stagebao.activity.artist;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;

import com.tianzeculture.stagebao.R;
import com.tianzeculture.stagebao.activity.personal.adapter.JobAdapter;
import com.tianzeculture.stagebao.base.BaseActivity;
import com.tianzeculture.stagebao.network.enity.MSG;
import com.tianzeculture.stagebao.util.StatusBarUtil;
import com.tianzeculture.stagebao.util.Util;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/6/29 0029.
 * 工作类型
 */

public class WorkTypeActivity extends BaseActivity {
    @BindView(R.id.tvTitle)
    TextView tvTitle;
    @BindView(R.id.lvWorkType)
    ListView lvWorkType;
    JobAdapter adapter = null;

    @Override
    public void initUI() {
        super.initUI();
        tvTitle.setText("工作类型");
        StatusBarUtil.setWindowStatusBarColor(this, R.color.colorGray_F8);

        final List<String> strings = new ArrayList<>();
        strings.add("商演路演");
        strings.add("平面拍摄");
        strings.add("会展活动");
        strings.add("网络宣传");
        adapter = new JobAdapter(this, strings);
        lvWorkType.setAdapter(adapter);
        lvWorkType.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                Intent intent = getIntent();
                intent.putExtra("WORK_TYPE", strings.get(i));
                setResult(Util.WORK_TYPE, intent);
                finish();
            }
        });
    }

    @Override
    public void refreshUI(int taskId, MSG msg) {
        super.refreshUI(taskId, msg);
    }

    @Override
    protected int getLayoutResID() {
        return R.layout.activity_work_type;
    }
}
